from multiprocessing.managers import BaseManager
class MathManager(BaseManager): pass
MathManager.register('math')
m = MathManager(address=('127.0.0.1', 50000), authkey='abc')
m.connect()
m = m.math()
print 'obj:',m


import sys,os
# if sys.argv[1] == 'g':
print 'pid',os.getpid()
print 'get ...'
print m.add(1,2)
# else:
print 'put ...'
print m.mul(2,1)